<?php
/**
 * Created by PhpStorm.
 * User: Jerry
 * Date: 2016/11/22
 * Time: 9:16
 */

namespace SDXApi\Model;

use Think\Model;

/**
 * Class OrderActionModel
 * @package SDXApi\Model
 */
class OrderActionModel extends Model
{

    /**
     * @var string
     */
    protected $tableName = 'order_action';


    /**
     * 插入订单操作日志
     * Created by Jerry
     * @param $data
     * @return bool|mixed
     */
    public function insert_order_action($data)
    {
        if (empty($data)) {
            return false;
        }

        if($this->create($data)){
            return $this->add();
        }

        throw_exception($this->getError());
    }
}